var app = getApp();
Component({
  properties: {
        psorder: Object,
        hprice : Number,
        agentprice : Number,
    },
    data: {
        scale : 14,
    },
    ready() {
        this.setData({
            polyline : [{
                points : [
                    {latitude:this.data.psorder.pslat*1,longitude:this.data.psorder.pslng*1},
                    {latitude:this.data.psorder.lat,longitude:this.data.psorder.lng}
                ],
                width : 2,
                color : '#FF0000DD',
                dottedLine: true
            }],
            markers: [{
                iconPath: "http://img11.360buyimg.com/ddimg/jfs/t1/110261/4/11135/5677/5e858ffdE2d90d5b9/ba288ba087967c18.png",
                id: 0,
                latitude: this.data.psorder.pslat,
                longitude: this.data.psorder.pslng,
                width: 33.75,
                height: 36
            }],
        })
    },
    options : {
        addGlobalClass : true,
    },
    methods: {
        callphone : function(e){
            app.com.callphone( e );
        },
        copy: function (e) {
            wx.setClipboardData({
                data : e.currentTarget.dataset.copy,
                success : function(){}
            });
        },
    }

})